package main

import (
	"fmt"
	"leetcode/53/solution"
)

// 53题
// 最大子序和
// https://leetcode-cn.com/problems/maximum-subarray/

func main() {
	var (
		case1 = []int{-2, 1, -3, 4, -1, 2, 1, -5, 4}
		case2 = []int{-2, -1}
	)

	// 方案1(未通过)
	fmt.Println(solution.V1(case1))
	fmt.Println(solution.V1(case2))

	// 方案2(1464ms)
	fmt.Println(solution.V2(case1))
	fmt.Println(solution.V2(case2))

	// 方案3(1464ms)
	fmt.Println(solution.V3(case1))
	fmt.Println(solution.V3(case2))
}
